iT邦幫忙

0

Open-audit 自訂欄位查詢

  • 分享至 

  • xImage
  •  

最近拜讀節省哥文章,架設了公司需要的資產管理系統,目前完成自訂欄位後,基本的資料已經足夠匯出資料給稽核單位,再來就是深入點的管理了。
.................
查詢內建範本列表Manage => Queries => List Querise

點選工作站的範本出來看


這邊列出了NAME IP MANUFACTURER MODEL SERIAL FROM FACTOR MEMORY PROCESSOR與SQL查詢語法,可參考這些語法改成自己想要的欄位列表

原始WorkStation SQL語法
……………………..
SELECT system.id AS system.id, system.icon AS system.icon, system.type AS system.type, system.name AS system.name, system.domain AS system.domain, system.ip AS system.ip, system.manufacturer AS system.manufacturer, system.model AS system.model, system.serial AS system.serial, system.os_family AS system.os_family, system.memory_count AS system.memory_count, system.form_factor AS system.form_factor, processor.description AS processor.description FROM system LEFT JOIN processor ON (processor.system_id = system.id AND processor.current = 'y') WHERE @filter AND system.type = 'computer' AND system.class != 'server' AND system.class != 'hypervisor' ORDER BY system.name
……………………..

自己編修後 主要條件改為
system.type = 'computer' AND system.form_factor = 'desktop' AND system.class != 'server' AND system.class != 'hypervisor' AND system.class != 'virtual server'
只秀COMPUTER與DESKTOP的設備
……………………..
SELECT system.id AS system.id, system.icon AS system.icon, system.type AS system.type, system.name AS system.name, system.domain AS system.domain, system.ip AS system.ip, system.manufacturer AS system.manufacturer, system.model AS system.model, system.serial AS system.serial, system.os_family AS system.os_family, system.memory_count AS system.memory_count, system.form_factor AS system.form_factor, processor.description AS processor.description FROM system LEFT JOIN processor ON (processor.system_id = system.id AND processor.current = 'y') WHERE @filter AND system.type = 'computer' AND system.form_factor = 'desktop' AND system.class != 'server' AND system.class != 'hypervisor' AND system.class != 'virtual server' ORDER BY system.ip 

自訂查詢欄位 Manage => Queries => Create Queries

查詢內建範本列表Manage => Queries => List Querise 多出了剛新增的查詢,點綠色PLAY鍵可列表

符合剛剛設定條件的列表資訊,再點選右上角的Export即可匯出報表


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言